<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript" src="<?php echo JS_PATH?>jquery.sgallery.js"></script>
<div class="pad-lr-10">
<form name="searchform" action="" method="get">
	<input type="hidden" value="experience_type" name="m"> 
	<input type="hidden" value="manage" name="c"> 
	<input type="hidden" value="init" name="a">
	<table width="100%" cellspacing="0" class="search-form">
		<tbody>
			<tr>
				<td>
					<div class="explain-col">
						<?php echo L('experience_type_name')?>:
						<input name="experience" class="input-text" value="<?php echo $_GET['experience']?>" type="text" size="20"> 
						<input type="submit" value="<?php echo L('search')?>" class="button" name="dosubmit">
					</div>
				</td>
			</tr>
		</tbody>
	</table>
</form>

<form name="myform" action="?m=experience_type&c=manage&a=del" method="post" onsubmit="return confirm('<?php echo L('confirm')?>')">
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th  align="center" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
			<th align="center">ID</th>
			<th align="center"><?php echo L('experience_type_name')?></th>
			<th align="center"><?php echo L('experience_type_en_name')?></th>
			<th align="center"><?php echo L('experience_author')?></th>
			<th align="center"><?php echo L('experience_time')?></th>
			<th align="center"><?php echo L('experience_operation')?></th>
		</tr>
	</thead>
<tbody>
<?php
if(!empty($experienceinfo)){
	foreach($experienceinfo as $k=>$v) {
?>
    <tr>
		<td align="center"><input type="checkbox" value="<?php echo $v['id']?>" name="id[]"></td>
		<td align="center"><?php echo $v['id']?></td>
		<td align="center"><?php echo $v['name']?></td>
		<td align="center"><?php if(!empty($v['en_name'])){echo $v['en_name'];}else{echo '<font color="red">（未设置）</font>';}?></td>
		<td align="center"><?php echo $v['username']?></td>
		<td align="center"><?php if(!empty($v['update_time'])){echo str_cut($v['update_time'],15,'');}else{echo '<font color="red">（未设置）</font>';}?></td>
		<td align="center">
		<a href="?m=experience_type&c=manage&a=edit&id=<?php echo $v['id']?>"><?php echo L('edit');?></a>
		&nbsp;|&nbsp;
		<a href="?m=experience_type&c=manage&a=del&id=<?php echo $v['id']?>" onClick="return confirm('<?php echo L('confirm')?>')"><?php echo L('del')?></a>
		 </td>
    </tr>
<?php
	}
}else {
?>
	<tr><td colspan='7' style='color:red;font-size:18px;text-align:center;'><span>暂无数据！</span></td></tr>
<?php }?>
</tbody>
</table>

<div class="btn">
<label for="check_box"><a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('select_all')?></a>/<a href="#" onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>"/>
</div>

<div id="pages"><?php echo $pages?></div>
</div>
</form>
</div>
</body>
</html>